package com.cam.iot.service;

import com.cam.iot.entity.IotLiveData;
import com.cam.iot.mapper.IotDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class IotDataService {

    @Autowired
    private IotDataMapper iotDataMapper;

    public List<String> listFactorList() {
        return iotDataMapper.listFactorCode();
    }

    public void insertHisDataMap(Map<String, Object> dataMap) {
        iotDataMapper.insertHisDataMap(dataMap);
    }

    public void insertLiveDataMap(List<IotLiveData> dataList) {
        iotDataMapper.insertLiveDataList(dataList);
    }

    public void removeLiveDataByDeviceId(String deviceId) {
        iotDataMapper.removeLiveDataByDeviceId(deviceId);
    }

}
